Merge "Adding a bunch of hooks from wikiHow into DifferenceEngine, 2nd try"
[lhc/web/wiklou.git] / includes / specials / SpecialUpload.php
index 09111f6..6fcdb00 100644 (file)
@@ -336,7 +336,7 @@ class SpecialUpload extends SpecialPage {
         * @param string $message HTML message to be passed to mainUploadForm
         */
        protected function showRecoverableUploadError( $message ) {
-               $sessionKey = $this->mUpload->stashSession();
+               $sessionKey = $this->mUpload->stashFile()->getFileKey();
                $message = '<h2>' . $this->msg( 'uploaderror' )->escaped() . "</h2>\n" .
                        '<div class="error">' . $message . "</div>\n";
 
@@ -365,10 +365,10 @@ class SpecialUpload extends SpecialPage {
                        return false;
                }
 
-               $sessionKey = $this->mUpload->stashSession();
+               $sessionKey = $this->mUpload->stashFile()->getFileKey();
 
                // Add styles for the warning, reused from the live preview
-               $this->getOutput()->addModuleStyles( 'mediawiki.special.upload' );
+               $this->getOutput()->addModuleStyles( 'mediawiki.special.upload.styles' );
 
                $warningHtml = '<h2>' . $this->msg( 'uploadwarning' )->escaped() . "</h2>\n"
                        . '<div class="mw-destfile-warning"><ul>';
@@ -535,7 +535,7 @@ class SpecialUpload extends SpecialPage {
                );
 
                if ( !$status->isGood() ) {
-                       $this->showUploadError( $this->getOutput()->parse( $status->getWikiText() ) );
+                       $this->showRecoverableUploadError( $this->getOutput()->parse( $status->getWikiText() ) );
 
                        return;
                }
@@ -864,7 +864,7 @@ class UploadForm extends HTMLForm {
 
                # Add a link to edit MediaWik:Licenses
                if ( $this->getUser()->isAllowed( 'editinterface' ) ) {
-                       $this->getOutput()->addModuleStyles( 'mediawiki.special' );
+                       $this->getOutput()->addModuleStyles( 'mediawiki.special.upload.styles' );
                        $licensesLink = Linker::linkKnown(
                                $this->msg( 'licenses' )->inContentLanguage()->getTitle(),
                                $this->msg( 'licenses-edit' )->escaped(),